<html>

<head>
<link rel="stylesheet" type="text/css" href="../../doc.css" />
<style type="text/css">
.auto-style1 {
	border-style: solid;
	border-width: 1px;
}
</style>
</head>

<body>
<h1><u>AssemblerPassTwo</u></h1>
<p><strong>Purpose:</strong> A class to perform the second pass of the 
assembler. Takes in the symbol table and intermediate data, and outputs the 
completed assembly report while filling out the object file information.</p>
<hr>
<p><strong>Procedure Name:</strong> AssemblerPassTwo<br><strong>Description:</strong> Constructor set up the 
second pass of the assembler.<br><strong>Specification reference codes:</strong><br><strong>Calling Sequence</strong><br>	<strong>Input Parameters:</strong> <br>&nbsp;&nbsp;&nbsp; 
List&lt;IntermediateData&gt; data - the results of the first pass of the assembler<br>&nbsp;&nbsp;&nbsp; 
Table symTable - the symbol table computed in the first pass.<br>	<strong>Output Parameters:</strong><br><br>
<strong>Error Conditions Tested:</strong> <br><strong>Error Messages Generated:</strong> <br><strong>Original Author:</strong> Kyle Salberg<br><strong>Procedure Creation Date:</strong> 
5/7/2011<br><strong>Modification Log:</strong><br>
<table class="auto-style1" style="width: 100%">
	<tr>
		<td style="width: 74px"><strong>Who</strong></td>
		<td style="width: 99px"><strong>When</strong></td>
		<td style="width: 300px"><strong>Why</strong></td>
	</tr>
	<tr>
		<td style="width: 74px; height: 23px;">Kyle</td>
		<td style="width: 99px; height: 23px;">5/7/2011</td>
		<td style="width: 300px; height: 23px;">Created</td>
	</tr>
	
	<tr>
		<td style="width: 74px">&nbsp;</td>
		<td style="width: 99px">&nbsp;</td>
		<td style="width: 300px">&nbsp;</td>
	</tr>
</table>
<br><strong>Coding Standards Met:</strong> Signed-Kyle<br><strong>Testing Standards Met:</strong> Signed-Aditya<br></p>
<hr>
<p><strong>Procedure Name:</strong> Compute<br><strong>Description:</strong> Creates the assembly report and 
builds the object file<br><strong>Specification reference codes:</strong> AO1, AO2, AO3, AO4, 
AO5, OB1, OB5<br><strong>Calling Sequence</strong><br>	<strong>Input Parameters:</strong> <br><strong>Output 
Parameters: </strong><br><br><strong>Error Conditions Tested:</strong><br><strong>Error Messages Generated:</strong><br><strong>Original Author:</strong> Kyle Salberg<br><strong>Procedure Creation Date:</strong> 
5/7/2011<br><strong>Modification Log:</strong><br>
<table class="auto-style1" style="width: 100%">
	<tr>
		<td style="width: 74px"><strong>Who</strong></td>
		<td style="width: 99px"><strong>When</strong></td>
		<td style="width: 300px">W<strong>hy</strong></td>
	</tr>
	<tr>
		<td style="width: 74px">Kyle</td>
		<td style="width: 99px">5/7/2011</td>
		<td style="width: 300px">Created</td>
	</tr>
	<tr>
		<td style="width: 74px">&nbsp;</td>
		<td style="width: 99px">&nbsp;</td>
		<td style="width: 300px">&nbsp;</td>
	</tr>
</table>
<br><strong>Coding Standards Met:</strong> Signed-Kyle<br><strong>Testing Standards Met:</strong> Signed-Aditya<br></p>
<hr>
<p><strong>Procedure Name:</strong> Calculate<br><strong>Description:</strong> Creates the assembly report and 
generates all associated object file records for one IntermediateData object.<br><strong>Specification reference codes:</strong><br><strong>Calling Sequence</strong><br>	<strong>Input Parameters:</strong> IntermediateData 
data - The data to use in the calculations.<br>		<strong>Output Parameters:</strong> <br><strong>Error 
Conditions Tested: </strong>Validates labels associated with the Entry directive, valid 
dat directive operands, adc operand count<br><strong>Error Messages Generated:</strong> 
InvalidUndefinedLabel, InvalidDatVal, InvalidADCCount<br><strong>Original Author:</strong> Kyle Salberg<br><strong>Procedure Creation Date:</strong> 
5/7/2011<br><strong>Modification Log:</strong><br>
<table class="auto-style1" style="width: 100%">
	<tr>
		<td style="width: 74px"><strong>Who</strong></td>
		<td style="width: 99px"><strong>When</strong></td>
		<td style="width: 300px">W<strong>hy</strong></td>
	</tr>
	<tr>
		<td style="width: 74px">Kyle</td>
		<td style="width: 99px">5/7/2011</td>
		<td style="width: 300px">Created</td>
	</tr>
	<tr>
		<td style="width: 74px">&nbsp;</td>
		<td style="width: 99px">&nbsp;</td>
		<td style="width: 300px">&nbsp;</td>
	</tr>
</table>
<br><br><strong>Coding Standards Met:</strong> Signed-Kyle<br><strong>Testing Standards Met:</strong> Signed-Aditya<br></p>
<hr><p><strong>Procedure Name:</strong> AddNOP<br><strong>Description:</strong> Creates an object file record for 
a NOP instruction.<br><strong>Specification reference codes:</strong><br><strong>Calling Sequence</strong><br>	<strong>Input Parameters:</strong> 
IntermediateData d - the line to be replaced by the NOP<br>	<strong>Output Parameters:</strong><br><br><strong>Error Conditions Tested:</strong> 
none<br><strong>Error Messages Generated:</strong> none<br><strong>Original Author:</strong> Kyle Salberg<br><strong>Procedure Creation Date:</strong> 
5/7/2011<br><strong>Modification Log:</strong><br>
<table class="auto-style1" style="width: 100%">
	<tr>
		<td style="width: 74px"><strong>Who</strong></td>
		<td style="width: 99px"><strong>When</strong></td>
		<td style="width: 300px">W<strong>hy</strong></td>
	</tr>
	<tr>
		<td style="width: 74px">Kyle</td>
		<td style="width: 99px">5/7/2011</td>
		<td style="width: 300px">Created</td>
	</tr>
	<tr>
		<td style="width: 74px">&nbsp;</td>
		<td style="width: 99px">&nbsp;</td>
		<td style="width: 300px">&nbsp;</td>
	</tr>
</table>
<br><br><strong>Coding Standards Met:</strong> Signed-Kyle<br><strong>Testing Standards Met:</strong> Signed-Aditya</p>
<p>&nbsp;</p>
<hr><p><strong>Procedure Name:</strong> AddDat0<br><strong>Description:</strong> Creates an object file record for 
a dat I=0 instruction<br><strong>Specification reference codes:</strong><br><strong>Calling Sequence</strong><br>	<strong>Input Parameters:</strong> 
IntermediateData d - the line to be replaced by the dat I=0<br>	<strong>Output Parameters:</strong><br><br><strong>Error Conditions Tested:</strong> 
none<br><strong>Error Messages Generated:</strong> none<br><strong>Original Author:</strong> Kyle Salberg<br><strong>Procedure Creation Date:</strong> 
5/7/2011<br><strong>Modification Log:</strong><br>
<table class="auto-style1" style="width: 100%">
	<tr>
		<td style="width: 74px"><strong>Who</strong></td>
		<td style="width: 99px"><strong>When</strong></td>
		<td style="width: 300px">W<strong>hy</strong></td>
	</tr>
	<tr>
		<td style="width: 74px">Kyle</td>
		<td style="width: 99px">5/7/2011</td>
		<td style="width: 300px">Created</td>
	</tr>
	<tr>
		<td style="width: 74px">&nbsp;</td>
		<td style="width: 99px">&nbsp;</td>
		<td style="width: 300px">&nbsp;</td>
	</tr>
</table>
<br><br><strong>Coding Standards Met:</strong> Signed-Kyle<br><strong>Testing Standards Met:</strong> Signed-Aditya<br>
</p>
<p>&nbsp;</p>
<hr><p><strong>Procedure Name:</strong> PrintReportLineNoHex<br><strong>Description:</strong> Prints a line for 
the assembler report with no hex code or relocation flag.<br><strong>Specification reference codes:</strong><br><strong>Calling Sequence</strong><br>	<strong>Input Parameters:</strong> <br>&nbsp;&nbsp;&nbsp; 
int lc - the location count of the line<br>&nbsp;&nbsp;&nbsp; int lineNum - the 
line number of the source line<br>&nbsp;&nbsp;&nbsp; String source - the source 
line<br>	<strong>Output Parameters:</strong><br><br><strong>Error Conditions Tested:</strong> 
none<br><strong>Error Messages Generated:</strong> none<br><strong>Original Author:</strong> Kyle Salberg<br><strong>Procedure Creation Date:</strong> 
5/7/2011<br><strong>Modification Log:</strong><br>
<table class="auto-style1" style="width: 100%">
	<tr>
		<td style="width: 74px"><strong>Who</strong></td>
		<td style="width: 99px"><strong>When</strong></td>
		<td style="width: 300px">W<strong>hy</strong></td>
	</tr>
	<tr>
		<td style="width: 74px">Kyle</td>
		<td style="width: 99px">5/7/2011</td>
		<td style="width: 300px">Created</td>
	</tr>
	<tr>
		<td style="width: 74px">&nbsp;</td>
		<td style="width: 99px">&nbsp;</td>
		<td style="width: 300px">&nbsp;</td>
	</tr>
</table>
<br><br><strong>Coding Standards Met:</strong> Signed-Kyle<br><strong>Testing Standards Met:</strong> Signed-Aditya</p>
<hr><p><strong>Procedure Name:</strong> EvaluateADC<br><strong>Description:</strong> Evaluates the result of an 
ADC expression<br><strong>Specification reference codes:</strong><br><strong>Calling Sequence</strong><br>	<strong>Input Parameters:</strong> <br>&nbsp;&nbsp;&nbsp; 
String[] list - the split list of operands and operators for the expression<br>&nbsp;&nbsp;&nbsp; 
IntermediateData d - the data for this adc instruction<br>	<strong>Output Parameters:</strong> 
returns the result of the adc expression <br><br><strong>Error Conditions Tested:</strong> 
none<br><strong>Error Messages Generated:</strong> none<br><strong>Original Author:</strong> Kyle Salberg<br><strong>Procedure Creation Date:</strong> 
5/7/2011<br><strong>Modification Log:</strong><br>
<table class="auto-style1" style="width: 100%">
	<tr>
		<td style="width: 74px"><strong>Who</strong></td>
		<td style="width: 99px"><strong>When</strong></td>
		<td style="width: 300px">W<strong>hy</strong></td>
	</tr>
	<tr>
		<td style="width: 74px">Kyle</td>
		<td style="width: 99px">5/7/2011</td>
		<td style="width: 300px">Created</td>
	</tr>
	<tr>
		<td style="width: 74px">&nbsp;</td>
		<td style="width: 99px">&nbsp;</td>
		<td style="width: 300px">&nbsp;</td>
	</tr>
</table>
<br><br><strong>Coding Standards Met:</strong> Signed-Kyle<br><strong>Testing Standards Met:</strong> Signed-Aditya</p>
<hr><p><strong>Procedure Name:</strong> CreateModifyRecords<br><strong>Description:</strong> Generates Modify 
Records for adc and adce directives<br><strong>Specification reference codes:</strong><br><strong>Calling Sequence</strong><br>	<strong>Input Parameters:</strong> <br>&nbsp;&nbsp;&nbsp; 
String[] list - the split list of operands and operators for the expression<br>&nbsp;&nbsp;&nbsp; 
IntermediateData d - the data for this adc instruction<br>&nbsp;&nbsp;&nbsp; int 
value - the integer value <br>	<strong>Output Parameters:</strong> returns the result of the adc 
expression <br><br><strong>Error Conditions Tested:</strong> 
none<br><strong>Error Messages Generated:</strong> none<br><strong>Original Author:</strong> Kyle Salberg<br><strong>Procedure Creation Date:</strong> 
5/7/2011<br><strong>Modification Log:</strong><br>
<table class="auto-style1" style="width: 100%">
	<tr>
		<td style="width: 74px"><strong>Who</strong></td>
		<td style="width: 99px"><strong>When</strong></td>
		<td style="width: 300px">W<strong>hy</strong></td>
	</tr>
	<tr>
		<td style="width: 74px">Kyle</td>
		<td style="width: 99px">5/7/2011</td>
		<td style="width: 300px">Created</td>
	</tr>
	<tr>
		<td style="width: 74px">&nbsp;</td>
		<td style="width: 99px">&nbsp;</td>
		<td style="width: 300px">&nbsp;</td>
	</tr>
</table>
<br><br><strong>Coding Standards Met:</strong> Signed-Kyle<br><strong>Testing Standards Met:</strong> Signed-Aditya</p>
<hr><p><strong>Procedure Name:</strong> EvaluateADCOperand<br><strong>Description:</strong> Evaluates a single 
operand of an ADC instruction and returns the associated integer value<br><strong>Specification reference codes:</strong><br><strong>Calling Sequence</strong><br>	<strong>Input Parameters:</strong> <br>&nbsp;&nbsp;&nbsp; 
String label - the label to be evaluated<br>&nbsp;&nbsp;&nbsp; IntermediateData 
d - the data for this adc instruction<br>	<strong>Output Parameters:</strong> returns the line 
count of the label or the value of the literal or equ <br><br><strong>Error Conditions 
Tested: </strong>checks adc expressions for containing only valid labels<br><strong>Error 
Messages Generated: </strong>InvalidUndefinedLabel<br><strong>Original Author:</strong> Kyle Salberg<br><strong>Procedure Creation Date:</strong> 
5/7/2011<br><strong>Modification Log:</strong><br>
<table class="auto-style1" style="width: 100%">
	<tr>
		<td style="width: 74px"><strong>Who</strong></td>
		<td style="width: 99px"><strong>When</strong></td>
		<td style="width: 300px">W<strong>hy</strong></td>
	</tr>
	<tr>
		<td style="width: 74px">Kyle</td>
		<td style="width: 99px">5/7/2011</td>
		<td style="width: 300px">Created</td>
	</tr>
	<tr>
		<td style="width: 74px">&nbsp;</td>
		<td style="width: 99px">&nbsp;</td>
		<td style="width: 300px">&nbsp;</td>
	</tr>
</table>
<br><br><strong>Coding Standards Met:</strong> Signed-Kyle<br><strong>Testing Standards Met:</strong> Signed-Aditya</p>
<hr><p><strong>Procedure Name:</strong> GetBaseLabel<br><strong>Description:</strong> Parses through EQU labels 
until it finds a label that is not a reference to another EQU.<br><strong>Specification reference codes:</strong><br><strong>Calling Sequence</strong><br>	<strong>Input Parameters:</strong> <br>&nbsp;&nbsp;&nbsp; 
String label - the label to be evaluated<br>	<strong>Output Parameters:</strong> returns the 
base equ value of this label<br><br><strong>Error Conditions Tested:</strong> <br><strong>Error Messages 
Generated: </strong><br><strong>Original Author:</strong> Kyle Salberg<br><strong>Procedure Creation Date:</strong> 5/7/2011<br><strong>Modification Log:</strong><br>
<table class="auto-style1" style="width: 100%">
	<tr>
		<td style="width: 74px"><strong>Who</strong></td>
		<td style="width: 99px"><strong>When</strong></td>
		<td style="width: 300px">W<strong>hy</strong></td>
	</tr>
	<tr>
		<td style="width: 74px">Kyle</td>
		<td style="width: 99px">5/7/2011</td>
		<td style="width: 300px">Created</td>
	</tr>
	<tr>
		<td style="width: 74px">&nbsp;</td>
		<td style="width: 99px">&nbsp;</td>
		<td style="width: 300px">&nbsp;</td>
	</tr>
</table>
<br><br><strong>Coding Standards Met:</strong> Signed-Kyle<br><strong>Testing Standards Met:</strong> Signed-Aditya</p>
<hr><p><strong>Procedure Name:</strong> EvaluateRlabel<br><strong>Description:</strong> Parses an RLabel, 
including *+ and *-, to return the correct line count of the label<br><strong>Specification reference codes:</strong><br><strong>Calling Sequence</strong><br>	<strong>Input Parameters:</strong> <br>&nbsp;&nbsp;&nbsp; 
String label - the label to be evaluated<br>&nbsp;&nbsp;&nbsp; IntermediateData 
d - the data object of the line containing the rlabel.<br>	<strong>Output Parameters:</strong> 
returns the line count pointed to by the rlabel or expression<br><br><strong>Error 
Conditions Tested: </strong><br><strong>Error Messages Generated:</strong> <br><strong>Original Author:</strong> Kyle Salberg<br><strong>Procedure Creation Date:</strong> 
5/7/2011<br><strong>Modification Log:</strong><br>
<table class="auto-style1" style="width: 100%">
	<tr>
		<td style="width: 74px"><strong>Who</strong></td>
		<td style="width: 99px"><strong>When</strong></td>
		<td style="width: 300px">W<strong>hy</strong></td>
	</tr>
	<tr>
		<td style="width: 74px">Kyle</td>
		<td style="width: 99px">5/7/2011</td>
		<td style="width: 300px">Created</td>
	</tr>
	<tr>
		<td style="width: 74px">&nbsp;</td>
		<td style="width: 99px">&nbsp;</td>
		<td style="width: 300px">&nbsp;</td>
	</tr>
</table>
<br><br><strong>Coding Standards Met:</strong> Signed-Kyle<br><strong>Testing Standards Met:</strong> Signed-Aditya</p>
<hr>
</body>
</html>
